<template>
  <el-tabs ref="dicConfigRef" v-model="activeName" class="dicTab" type="card">
    <el-tab-pane v-if="$hasTabPermission(11010201)" label="自定字典" name="first">
      <customize-tab />
    </el-tab-pane>
    <el-tab-pane v-if="$hasTabPermission(11010202)" label="预设字典" name="second">
      <preset-tab />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
  import CustomizeTab from './CustomizeTab'
  import PresetTab from './PresetTab'

  export default {
    name: 'dicConfig',
    components: {
      CustomizeTab, PresetTab
    },
    data() {
      return {
        activeName: 'first'
      }
    },
    mounted() {
      this.activeName = this.$refs.dicConfigRef.panes[0].name
    }
  }
</script>

<style scoped>
.dicTab {
  height: 100%;
}
</style>
